<?php


namespace app\admin\controller;


use app\common\controller\CommonController;
use app\common\service\Lang;
use think\facade\Db;

class TestController extends CommonController
{
    public function test()
    {
        echo 'admin test';
        Db::startTrans();
        try {

            Db::commit();
        } catch (\Exception $e) {
            Db::rollback();
            throw $e;
        }
    }

    public function getList()
    {
        return retJson(Lang::GETDone);
    }

    public function post()
    {
        return retJson(Lang::POSTDone);

    }

    public function put()
    {
        return retJson(Lang::PUTDone);

    }

    public function delete()
    {
        return retJson(Lang::DELETEDone);
    }
}